﻿
elector_voting_strength_byzantine_elective_modifier = {
	modifier = { #The Emperor's word is worth more than anybody else's by far.
		add = 100
		desc = tooltip_imperial_vote_strength_emperor_influence
		scope:holder = root
	}
	modifier = { #...Yet it can be reduced in certain circumstances.
		add = -20
		desc = tooltip_imperial_vote_strength_emperor_unpurpled
		scope:holder = root
		NOT = { has_trait = born_in_the_purple }
	}
	modifier = { #The Basileios must have an untarnished body.
		add = -50
		desc = tooltip_imperial_vote_strength_emperor_deformed
		scope:holder = root
		scope:title = title:e_byzantium
		is_adult = yes
		OR = {
			has_trait = disfigured
			has_trait = blind
			has_trait = eunuch
			has_trait = dwarf
			has_trait = maimed
			has_trait = wounded_3
			has_trait = clubfooted
			has_trait = lisping
			has_trait = inbred
			has_trait = hunchbacked
			has_trait = giant
			has_trait = scaly
			has_trait = albino
			has_trait = bleeder
			has_trait = gout_ridden
		}
	}
	modifier = { #Children are not leaders.
		add = -40
		desc = tooltip_imperial_vote_strength_emperor_child
		scope:holder = root
		scope:title = title:e_byzantium
		NOT = { is_adult = yes }
	}
	modifier = { #Rome is not ruled by children.
		add = -130
		desc = tooltip_imperial_vote_strength_emperor_child_roman
		scope:holder = root
		scope:title = title:h_roman_empire
		NOT = { is_adult = yes }
	}
	modifier = { #Being a good orator.
		add = 10
		desc = tooltip_imperial_vote_strength_emperor_diplomacy
		scope:holder = root
		is_adult = yes
		diplomacy >= 10
		add = {
			value = 10
			if = {
				limit = {
					diplomacy >= 15
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy >= 20
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy >= 25
				}
				add = 5
			}
		}
	}
	#The Electors: General modifiers.
	modifier = { #Prestigious people hold more sway.
		desc = tooltip_imperial_vote_strength_elector_prestige
		is_vassal_of = scope:holder
		NOT = {
			scope:holder = root
		}
		prestige_level >= 2
		add = {
			value = 5
			if = {
				limit = {
					prestige_level >= 3
				}
				add = 5
			}
			if = {
				limit = {
					prestige_level >= 4
				}
				add = 5
			}
			if = {
				limit = {
					prestige_level >= 5
				}
				add = 5
			}
		}
	}

	modifier = { #People from Prestigious dynasties hold more sway.
		desc = tooltip_imperial_vote_strength_elector_prestige_dynasty
		is_vassal_of = scope:holder
		NOT = {
			scope:holder = root
		}
		dynasty = { dynasty_prestige_level >= 4 }
		add = {
			value = 5
			if = {
				limit = {
					dynasty = { dynasty_prestige_level >= 5 }
				}
				add = 5
			}
			if = {
				limit = {
					dynasty = { dynasty_prestige_level >= 6 }
				}
				add = 5
			}
			if = {
				limit = {
					dynasty = { dynasty_prestige_level >= 7 }
				}
				add = 5
			}
			if = {
				limit = {
					dynasty = { dynasty_prestige_level >= 8 }
				}
				add = 10
			}
			if = {
				limit = {
					dynasty = { dynasty_prestige_level >= 9 }
				}
				add = 10
			}
			if = {
				limit = {
					dynasty = { dynasty_prestige_level >= 10 }
				}
				add = 10
			}
		}
	}
	modifier = { #Powerful people can pull strings.
		add = 5
		desc = tooltip_imperial_vote_strength_elector_tier
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		highest_held_title_tier > 2
		add = {
			value = 5
			if = {
				limit = {
					highest_held_title_tier > 3
				}
				add = 10
			}
		}
	}
	#Commanders
	modifier = { #Martial increases a commander's influence.
		add = 10
		desc = tooltip_imperial_vote_strength_commander_martial
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		martial >= 8
		OR = {
			is_knight_of = scope:holder
			has_council_position = councillor_marshal
		}
		add = {
			value = 10
			if = {
				limit = {
					martial >= 10
				}
				add = 5
			}
			if = {
				limit = {
					martial > 12
				}
				add = 5
			}
			if = {
				limit = {
					martial > 14
				}
				add = 5
			}
			if = {
				limit = {
					martial > 16
				}
				add = 5
			}
			if = {
				limit = {
					martial > 18
				}
				add = 5
			}
			if = {
				limit = {
					martial > 20
				}
				add = 5
			}
			if = {
				limit = {
					martial > 25
				}
				add = 5
			}
			if = {
				limit = {
					martial > 30
				}
				add = 5
			}
			if = {
				limit = {
					has_council_position = councillor_marshal
				}
				multiply = 2
			}
		}
	}
	modifier = { #Diplomacy increases the Chancellor's influence.
		add = 10
		desc = tooltip_imperial_vote_strength_chancellor_diplomacy
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		diplomacy >= 8
		has_council_position = councillor_chancellor
		add = {
			value = 10
			if = {
				limit = {
					diplomacy >= 10
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 12
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 14
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 16
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 18
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 20
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 25
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 30
				}
				add = 5
			}
		}
	}
	modifier = { #Stewardship increases the Steward's influence.
		add = 10
		desc = tooltip_imperial_vote_strength_steward_stewardship
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		stewardship >= 8
		has_council_position = councillor_steward
		add = {
			value = 10
			if = {
				limit = {
					stewardship >= 10
				}
				add = 5
			}
			if = {
				limit = {
					stewardship > 12
				}
				add = 5
			}
			if = {
				limit = {
					stewardship > 14
				}
				add = 5
			}
			if = {
				limit = {
					stewardship > 16
				}
				add = 5
			}
			if = {
				limit = {
					stewardship > 18
				}
				add = 5
			}
			if = {
				limit = {
					stewardship > 20
				}
				add = 5
			}
			if = {
				limit = {
					stewardship > 25
				}
				add = 5
			}
			if = {
				limit = {
					stewardship > 30
				}
				add = 5
			}
		}
	}
	modifier = { #Intrigue increases the Spymaster's influence.
		add = 10
		desc = tooltip_imperial_vote_strength_spymaster_intrigue
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		intrigue >= 8
		has_council_position = councillor_spymaster
		add = {
			value = 10
			if = {
				limit = {
					intrigue >= 10
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 12
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 14
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 16
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 18
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 20
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 25
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 30
				}
				add = 5
			}
		}
	}
	modifier = { #Learning increases the Chaplain's influence.
		add = 10
		desc = tooltip_imperial_vote_strength_chaplain_learning
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		learning >= 8
		has_council_position = councillor_court_chaplain
		add = {
			value = 10
			if = {
				limit = {
					learning >= 10
				}
				add = 5
			}
			if = {
				limit = {
					learning > 12
				}
				add = 5
			}
			if = {
				limit = {
					learning > 14
				}
				add = 5
			}
			if = {
				limit = {
					learning > 16
				}
				add = 5
			}
			if = {
				limit = {
					learning > 18
				}
				add = 5
			}
			if = {
				limit = {
					learning > 20
				}
				add = 5
			}
			if = {
				limit = {
					learning > 25
				}
				add = 5
			}
			if = {
				limit = {
					learning > 30
				}
				add = 5
			}
		}
	}
	modifier = { #Chaplain is also the head of the ruling religion.
		add = 15
		desc = tooltip_imperial_vote_strength_chaplain_patriarch
		is_vassal_of = scope:holder
		scope:holder.faith = root.faith
		NOT = { scope:holder = root }
		faith = { exists = religious_head }
		scope:holder.faith.religious_head = root.faith.religious_head
		has_council_position = councillor_court_chaplain
	}
	modifier = { #Spouse Bonus
		add = 30
		desc = tooltip_imperial_vote_strength_spouse
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		is_spouse_of = scope:holder
	}
	modifier = { #Those crafty Byzantines...
		desc = tooltip_imperial_vote_strength_greek_intrigue
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		culture = { has_cultural_pillar = heritage_byzantine }
		intrigue >= 8
		add = {
			value = 10
			if = {
				limit = {
					intrigue >= 10
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 12
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 14
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 16
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 18
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 20
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 25
				}
				add = 5
			}
			if = {
				limit = {
					intrigue > 30
				}
				add = 5
			}
		}
	}
	modifier = { #Romans love their orations...
		desc = tooltip_imperial_vote_strength_roman_diplomacy
		is_vassal_of = scope:holder
		NOT = { scope:holder = root }
		culture = { has_cultural_pillar = heritage_latin }
		diplomacy >= 8
		add = {
			value = 10
			if = {
				limit = {
					diplomacy >= 10
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 12
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 14
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 16
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 18
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 20
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 25
				}
				add = 5
			}
			if = {
				limit = {
					diplomacy > 30
				}
				add = 5
			}
		}
	}
}
